Skip to content

Introduce Univ newtype#24

Open
phadej wants to merge 8 commits intodmwit:masterfrom
phadej:univ
Open

Introduce Univ newtype#24
phadej wants to merge 8 commits intodmwit:masterfrom
phadej:univ

Conversation

@phadej
Copy link
Collaborator

@phadej phadej commented Jun 29, 2016

This is first step for #23

I introduce Univ newtype, so instance definitions could be done based on combinators on Univ.

Also I change indentation to use spaces.

Follow-ups would be:

  • Don't use universe or universeF in instance declarations
    • Introduce needed combinators to Data.Universe.Helpers
  • Experiment on Univ implementation

Open questions:

  • universe and universeF don't need to be in the class anymore. Then we won't accidentally memoise when using them!
  • Monoid instance for Univ (using fair interleaving?)
  • Foldable/Traversable for Univ (Foldable provides natural toList!)
  • better name for Univ, maybe Distinct or USet?
  • Rename Data.Universe.Helpers to Data.Universe.Univ

Some answers:

  • I bumped versions to 2 as this is huge update.
  • I think that small breaking changes in universe-base (i.e. combinator removal, or even redefining of Univ) won't break universe-instance-* API. As Univ isn't exported from instance packages, their public api isn't broken (if they continue to work). So we can depend on universe-instances-* >= 2 && <3. That could be documented in universe package haddock if this scheme makes sense.

@phadej
Copy link
Collaborator Author

phadej commented Jun 29, 2016

@dmwit, I also commited .travis.yml into repository, with cabal-install-1.24 it's possible to build multi-package projects using "standard tools". .travis.yml has rough edges, new-build isn't yet polished, but having CI would be great!

@phadej
Copy link
Collaborator Author

phadej commented Jun 29, 2016

Note Univ is different implementation of Omega in https://hackage.haskell.org/package/control-monad-omega-0.3.1/docs/Control-Monad-Omega.html

By making similar Applicative instance, we can have similar definitions for Universe and Finite of tuples for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant